Xbasic

OBJECT.CHILD Function

Syntax

<CHILD_OBJECT> as P = .Child(N num | C name)

Arguments

num

The number of the child object.

name

The name of the child object.

Description

Returns a pointer to the specified child object contained by the object.

Discussion

The <OBJECT>.CHILD() method applies to:

Alpha Anywhere (for <OBJECT> use the keyword "A5")
Control Panel (for <OBJECT> use the keyword "CONTROLPANEL")
Browses (for <OBJECT> use either the <BROWSE> pointer or the name of the browse)
Forms (for <OBJECT> use either the <FORM> pointer or the name of the form)
Form Controls (for <OBJECT> use the <CONTROL> pointer or the address of the control)

The <OBJECT>.CHILD() method returns a pointer to the specified child object.

Example

The following example illustrates the retrieval of several properties of a button on a form.

dim ptr as P
dim cptr as P
ptr = form.load("Customer Information")
cptr = ptr.child("Button1")
? cptr.text
= "Mail Merge"
? cptr.object.width
= 0.900000
? cptr.object.height
= 0.350000

Limitations

Desktop applications only.

See Also